home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sun Solutions 2000 #2
/
Sun Solutions CD (Volume 2 2000)(Special Focus - Java Technologies)(Disc 1).ISO
/
products
/
Software
/
BostonBusinessComputing
/
bbc
/
dist
/
vtssnet
< prev
next >
Wrap
Text File
|
2000-02-11
|
3KB
|
114 lines
#
# Vsh script for use with TSSnet transport software
#
IF ( v_com == "rl" ) SET v_node=v_n1
set v_a1 = (v_fs1:ua) - "::"
set v_a2 = (v_fs2:ua) - "::"
SET v_n1 = v_n1 + v_a1
SET v_n2 = v_n2 + v_a2
IF ( -n v_n1 ) THEN
SET v_n1 = v_n1 + "::"
ELSE
SET v_n2 = v_n2 + "::"
ENDIF
# Set qualifier strings
IF ( q_log ) SET vq_log = " -L "
IF ( q_image ) SET vq_image = " -i "
IF ( q_full ) SET vq_full = " -l "
IF ( v_os == "no" ) SET vq_full = " -l "
IF ( q_confirm ) SET vq_confirm = " -q "
IF ( q_replace ) SET vq_replace = " -s "
#
# Execute the appropriate network command
#
IF ( v_com == "bt" ) THEN
# exit here to test for existence of vnet for vbackup
EXIT
ELSE IF ( v_com == "ba" ) THEN
SET inf = v_n1+v_d1+v_f1
SET outf= v_n2+v_d2+v_f2
IF ( -n v_n1 ) THEN
SET netcom = "dcp -i " + "\'" + inf + "\'" + " -"
ELSE
SET netcom = "dcp -i - " + "\'" + outf + "\'"
ENDIF
SHELL netcom
EXIT
ELSE IF ( v_com == "cp" ) THEN
SET quals = vq_image + vq_log + vq_confirm + vq_replace
SET inf = v_n1+v_d1+v_f1
SET outf= v_n2+v_d2+v_f2
SET netcom = "dcp " + quals + "\'" + inf+ "\' \'"+ outf + "\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "ls" ) THEN
SET fn = "/tmp/v_" + pid
SET quals = vq_full
SET inf = v_n1+v_d1+v_f1
SET tsscom ="dls " + quals + "\'" + inf + "\'"
SET netcom = tsscom + " < /dev/null > "+ fn
SHELL netcom
IF ( q_full ) THEN
IF ( -n fn) THEN
SHELL "/bin/cat " + fn + " ; /bin/rm " + fn
ENDIF
EXIT
ENDIF
IF ( v_os == "yes" ) THEN
SET v_filter = "tssvmsfltr"
ELSE
SET v_filter = "tssunxfltr"
ENDIF
IF ( -n fn) THEN
SHELL "/bin/cat " + fn + " | " + v_filter + "; /bin/rm " + fn
ENDIF
EXIT
ELSE IF ( v_com == "ma" ) THEN
SET quals = vq_log
# SET netcom = "dnamail " + quals + "\'" + recips + text +"\'"
SET netcom="/usr/lib/sendmail -t "+ recips + " " + text
SHELL netcom
EXIT
ELSE IF ( v_com == "mv" ) THEN
SET quals = vq_log + vq_confirm
SET inf = v_n1+v_d1+v_f1
SET outf= v_f2
SET netcom = "dmv " + quals + "\'" + inf +"\' \'"+ outf + "\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "pr" ) THEN
SET quals = vq_log
SET inf = v_n1+v_d1+v_f1
SET netcom = "dpr " + quals + "\'" + inf + "\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "rl" ) THEN
SET netcom = "dlogin " + v_node + " < /dev/tty"
SHELL netcom
EXIT
ELSE IF ( v_com == "rm" ) THEN
SET quals = vq_log + vq_confirm
SET inf = v_n1+v_d1+v_f1
SET netcom = "drm " + quals + "\'" + inf + "\'"
SHELL netcom
EXIT
ELSE IF ( v_com == "sn" ) THEN
SET netcom = "ncp show known nodes "
SHELL netcom
EXIT
ELSE IF ( v_com == "ty" ) THEN
SET quals = vq_log
SET inf = v_n1+v_d1+v_f1
SET netcom = "dcat " + quals + "\'" + inf + "\'"
SHELL netcom
EXIT
ELSE
ERROR "%VNET-W-IVCOMM, Invalid command."
ENDIF